package com.grape.juc.threadpool.future;
/**
 * 描述:真实数据
 * @author: myx
 * @date: 2019-05-08
 * Copyright © 2019-grape. All rights reserved.
 */
public class RealData implements Data {
	private String result;

	public RealData(String data) {
		System.out.println("正在使用data:" + data + "网络请求数据,耗时操作需要等待.");
		try {
			//业务耗时
			Thread.sleep(3000);
		} catch (Exception e) {
		}
		System.out.println("操作完毕,获取结果...");
		result = "myx";
	}

	@Override
	public String getRequest() {
		return result;
	}
}